home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part2 / 13323 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  826 b 

  1. Path: nntp1.best.com!usenet
  2. From: javaprog@best.com (John Lockwood)
  3. Newsgroups: comp.lang.c++
  4. Subject: Re: Default Class Initialisation Question...
  5. Date: Mon, 25 Mar 1996 01:04:13 GMT
  6. Organization: Best Internet Communications
  7. Message-ID: <4j4req$lvs@nntp1.best.com>
  8. References: <00001a81+0000af6f@msn.com>
  9. NNTP-Posting-Host: javaprog.vip.best.com
  10. X-Newsreader: Forte Free Agent 1.0.82
  11.  
  12. Tony_Bateman@msn.com (Tony Bateman) wrote:
  13.  
  14. >Rectangle::Rectangle(USHORT width=0, USHORT height=0):
  15. >...
  16. >Fine. But what if I want to leave the width a default value of 0 and 
  17. >set the height to 30. How could I do it? 
  18.  
  19. Well, in general, you can't.  You would have to say 
  20.  
  21. Rectangle myRectangle(0, 30);
  22.  
  23. The default parameter is always the last one.
  24. Regards,
  25.  
  26.  
  27.  
  28. John Lockwood
  29. john@wwg.com
  30. javaprog@best.com
  31. http://www.best.com/~javaprog
  32.  
  33.